<?php get_header(); 
?>
<?php
$tblog=$_GET["t"];
if($tblog=="blog"){
?>
  <div class="grid_8" id="main">
  	<div class="grid_8 alpha omega" id="posts">
<?php
while (have_posts()) : the_post(); 
 ?>
    	<div class="grid_8 alpha omega post">
  			<div class="grid_7 alpha" id="title"><h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2></div>
    		<div class="grid_1 omega comment-count" ><?php comments_number('0', '1', '%'); ?></div>
    		<div class="grid_7 alpha postdata">Written on: <span class="datetime"><?php the_time('m-d-y') ?></span> &#183; Posted in: <span class="post-category"><?php the_category( ","); ?></span></div>
    		<div class="grid_8 alpha omega content"><?php the_excerpt(); ?></div>
        	<div class="grid_8 alpha omega post-tags"><?php the_tags('', ', ', ''); ?></div>
        </div>
<?php endwhile; ?>
    </div>
  <div class="grid_4 alpha previous-link"><?php previous_post_link('&laquo; %link (last)') ?></div>
  <div class="grid_4 omega next-link"><?php next_post_link('(new) %link &raquo;') ?></div>
  </div>
 <?php get_sidebar(); ?>
<?php
}else{ // no blog
?>
<div class="grid_12" id="poster">
<?php $lastposts = lastPoster();
foreach($lastposts as $post) :
    setup_postdata($post);
	the_image('full','');
endforeach; ?>
  </div>
  <div class="grid_4 block" id="services">
  		<div class="grid_4 alpha omega topictitle" id="servicestitle"><a href="/services">Services</a></div>
        <?php 
        echo $a16006a_service_expcert;
        ?>
</div>
  <div class="grid_4 block" id="blog">
  		<div class="grid_4 alpha omega topictitle" id="blogtitle"><a href="#">Blog</a></div>
        please wait...
  </div>
  <div class="grid_4 block" id="social">
  		<div class="grid_4 alpha omega topictitle" id="socialtitle"><a href="#">Social</a></div>
        <ul>
        <li class="grid_4 alpha omega" id="twitter">Tweet @a16006</li>
        <li class="grid_4 alpha omega" id="email">gmail</li>
        <li class="grid_4 alpha omega" id="friendfeed">friendfeed</li>
        </ul>
  </div>
<?php
}
get_footer(); 
?>


